﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars;
using DevExpress.XtraBars.Ribbon;
using DevExpress.XtraBars.Helpers;
using DevExpress.Skins;
using DevExpress.LookAndFeel;
using DevExpress.UserSkins;
using SaleManagement.modules;

namespace SaleManagement
{
    public partial class Form1 : RibbonForm
    {        
        public Form1()
        {
            InitializeComponent();
            InitSkinGallery();
        }
        void InitSkinGallery()
        {
            SkinHelper.InitSkinGallery(rgbiSkins, true);
        }

        private void iNew_ItemClick(object sender, ItemClickEventArgs e)
        {
            
        }
        private void DisplayView(Control view)
        {            
            this.rootPanel.Controls.Clear();
            this.rootPanel.Controls.Add(view);
            view.Dock = DockStyle.Fill;           
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            BaseUC us1 = new BaseUC();
            DisplayView(us1);
        }

        private void btnLogin_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmLogin login = new frmLogin();
            login.ShowDialog();
        }

        private void btnShopInfo_ItemClick(object sender, ItemClickEventArgs e)
        {
            usShopInfo frmShopInf = new usShopInfo();
            DisplayView(frmShopInf);
        }

        private void btnSetupBranch_ItemClick(object sender, ItemClickEventArgs e)
        {
            usBranchList branchList = new usBranchList();
            DisplayView(branchList);
        }

        private void btnNganhHang_ItemClick(object sender, ItemClickEventArgs e)
        {
            usNganhHang usNganhHang = new usNganhHang();
            DisplayView(usNganhHang);
        }

        private void btnProvider_ItemClick(object sender, ItemClickEventArgs e)
        {
            usNhaCungCap usncc = new usNhaCungCap();
            DisplayView(usncc);
        }

        private void btnCustomer_ItemClick(object sender, ItemClickEventArgs e)
        {
            usKhachHang uskh = new usKhachHang();
            DisplayView(uskh);
        }

        private void btnNhanVien_ItemClick(object sender, ItemClickEventArgs e)
        {
            usNhanVien usnv = new usNhanVien();
            DisplayView(usnv);
        }

        private void btnKho_ItemClick(object sender, ItemClickEventArgs e)
        {
            usKhohang uskho = new usKhohang();
            DisplayView(uskho);
        }

        private void btnLoaiHang_ItemClick(object sender, ItemClickEventArgs e)
        {
            usLoaiHang usloaihang = new usLoaiHang();
            DisplayView(usloaihang);
        }

        private void btnDVT_ItemClick(object sender, ItemClickEventArgs e)
        {
            usDonViTinh usdvt = new usDonViTinh();
            DisplayView(usdvt);
        }

        private void btnMatHang_ItemClick(object sender, ItemClickEventArgs e)
        {
            usMatHang usmh = new usMatHang();
            DisplayView(usmh);
        }

    }
}